package com.galeno.utils;

import org.apache.commons.lang3.time.DateUtils;

import java.util.Calendar;
import java.util.Date;

/**
 * @author galeno
 * @Title:
 * @Description:
 * @date 日期2021/11/16时间20:23
 */
public class TimeBoundUtil {

    //向上取整,减去两个小时例如  5:20-> 6:00-2:00=4:00
    public static long getTimeBound(long currentTime){
        return DateUtils.ceiling(new Date(currentTime), Calendar.HOUR).getTime()-(2*3600*1000);
    }



}
